﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CoreShop.Model.FromBody
{
    /// <summary>
    /// 会员
    /// </summary>
    public class GsPosVip
    {
        public long vipId { get; set; }
        public string vipNo { get; set; }
        public string vipTypeId { get; set; }
        public string vipLevelId { get; set; }
        public string vipLevelName { get; set; }
        public string vipName { get; set; }
        public string vipTel { get; set; }
        public string vipSix { get; set; }
        public string vipBirthday { get; set; }
        public string beginDate { get; set; }
        public string endDate { get; set; }
        public string sourceId { get; set; }
        public string branchId { get; set; }
        public decimal qtySum { get; set; }
        public decimal qty { get; set; }
        public string vipStatus { get; set; }
        public long? cardId { get; set; }
        public string cardNo { get; set; }
        public object cardGroupHeadBillNo { get; set; }
        public string cardTypeId { get; set; }
        //public int cardMedium { get; set; }
        public string startDate { get; set; }
        public decimal? balance { get; set; }
        public decimal? balanceZ { get; set; }
        public decimal? sumPayAmount { get; set; }
        public decimal? sumSaleAmount { get; set; }
        /// <summary>
        /// 合计充值金额
        /// </summary>
        public decimal? sumBalance { get; set; }
        public object endSaleDate { get; set; }
        public string endPayDate { get; set; }
        public string sumSaleNum { get; set; }
        public string sumBalanceNum { get; set; }
        /// <summary>
        /// 是否锁定 0是1 否
        /// </summary>
        public string canLock { get; set; }
        /// <summary>
        /// 状态 0初始化 1启用 2挂失 3锁定 4注销
        /// </summary>
        public int? status { get; set; }

        /// <summary>
        /// 得到状态名称
        /// </summary>
        /// <returns></returns>
        public string GetStatusName()
        {
            if (status == 0)
            {
                return "初始化";
            }

            if (status == 1)
            {
                return "启用";
            }

            if (status == 2)
            {
                return "挂失";
            }

            if (status == 3)
            {
                return "锁定";
            }

            if (status == 4)
            {
                return "注销";
            }

            return "未知";
        }

        public string couponNum { get; set; }
        public dynamic vipLevelRightDto { get; set; }
    }

    public class GsVipInfo
    {
        public long vipId { get; set; } = 0;
        public string vipTel { get; set; } = "";
        public string vipName { get; set; } = "";
        public int? vipSix { get; set; }
        public string vipBirthday { get; set; }
        public string levelName { get; set; } = "";
        public int? vvip { get; set; }
        public int? growthValue { get; set; }
        public int? extraGrowthValue { get; set; }
        public int? totalGrowthValue { get; set; } 
        public decimal? qty { get; set; }
        public decimal? balance { get; set; } 
        public decimal? sumSaleAmount { get; set; } 
        public int? sumSaleNum { get; set; } 
        public string endSaleDate { get; set; } = "";
        public string branchId { get; set; } = "";
        public string branchName { get; set; } = "";
        public string beginDate { get; set; } = "";
        public string endDate { get; set; } = "";
        public string vipStatus { get; set; } = "";
        /// <summary>
        /// 会员等级
        /// </summary>
        public string vipLevelId { get; set; }
        /// <summary>
        /// 储值卡ID
        /// </summary>
        public long? cardId { get; set; }
        /// <summary>
        /// 储值卡号
        /// </summary>
        public string cardNo { get; set; }
    }

    /// <summary>
    /// 修改会员
    /// </summary>
    public class GsEditVipModel
    {
        public List<GsEditVipInfo> vipList { get; set; }
        public List<GsEditVipCard> cardList { get; set; }
    }

    /// <summary>
    /// 修改会员信息
    /// </summary>
    public class GsEditVipInfo
    {
        public long vipId { get; set; } = 0;
        public string vipTel { get; set; } = "";
        public string vipName { get; set; } = "";
        public int? vipSix { get; set; }
        public string vipBirthday { get; set; }
        /// <summary>
        /// 会员等级
        /// </summary>
        public long vipLevelId { get; set; }
    }

    /// <summary>
    /// 修改会员储值卡
    /// </summary>
    public class GsEditVipCard
    {
        /// <summary>
        /// 储值卡ID
        /// </summary>
        public long? cardId { get; set; }
        /// <summary>
        /// 储值卡号
        /// </summary>
        public string cardNo { get; set; }
    }

}
